<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>perlfaq1 - General Questions About Perl - Perldoc Browser</title>
    <link rel="search" href="https://perldoc.perl.org/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser">
    <link rel="canonical" href="https://perldoc.perl.org/perlfaq1">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" />
    <style>
      body {
        background: #f4f4f5;
        color: #020202;
      }
      .navbar-dark {
        background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0);
        background-repeat: repeat-x;
      }
      .navbar-dark .navbar-nav .nav-link,
      .navbar-dark .navbar-nav .nav-link:focus { color: #fff }
      .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 }
      #wrapperlicious {
        margin: 0 auto;
        font: 0.9em 'Helvetica Neue', Helvetica, sans-serif;
        font-weight: normal;
        line-height: 1.5em;
        margin: 0;
        padding: 0;
      }
      #wrapperlicious h1 { font-size: 1.5em }
      #wrapperlicious h2 { font-size: 1.3em }
      #wrapperlicious h3 { font-size: 1.1em }
      #wrapperlicious h4 { font-size: 0.9em }
      #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3,
      #wrapperlicious h4, #wrapperlicious dt {
        color: #020202;
        margin-top: 1em;
        margin-bottom: 1em;
        position: relative;
        font-weight: bold;
      }
      #wrapperlicious a { color: inherit; text-decoration: underline }
      #wrapperlicious #toc { text-decoration: none }
      #wrapperlicious a:hover { color: #2a2a2a }
      #wrapperlicious a img { border: 0 }
      #wrapperlicious :not(pre) > code {
        color: inherit;
        background-color: rgba(0, 0, 0, 0.04);
        border-radius: 3px;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        padding: 0.3em;
      }
      #wrapperlicious dd {
        margin: 0;
        margin-left: 2em;
      }
      #wrapperlicious dt {
        color: #2a2a2a;
        font-weight: bold;
        margin-left: 0.9em;
      }
      #wrapperlicious p {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious li > p {
        margin-bottom: 0;
        margin-top: 0;
      }
      #wrapperlicious pre {
        border: 1px solid #c1c1c1;
        border-radius: 3px;
        font: 100% Consolas, Menlo, Monaco, monospace;
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious pre > code {
        display: block;
        background-color: #f6f6f6;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        line-height: 1.5em;
        text-align: left;
        white-space: pre;
        padding: 1em;
      }
      #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious ul {
        list-style-type: square;
      }
      #wrapperlicious ul ul {
        margin-bottom: 0px;
        margin-top: 0px;
      }
      #footer {
        font-size: 0.8em;
        padding-top: 0.5em;
        text-align: center;
      }
      #more {
        display: inline;
        font-size: 0.8em;
      }
      #perldocdiv {
        background-color: #fff;
        border: 1px solid #c1c1c1;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        margin-left: auto;
        margin-right: auto;
        padding: 3em;
        padding-top: 1em;
        max-width: 960px;
      }
      #moduleversion { float: right }
      #wrapperlicious .leading-notice {
        font-style: italic;
        padding-left: 1em;
        margin-top: 1em;
        margin-bottom: 1em;
      }
      #wrapperlicious .permalink {
        display: none;
        left: -0.75em;
        position: absolute;
        padding-right: 0.25em;
        text-decoration: none;
      }
      #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink,
      #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink,
      #wrapperlicious dt:hover .permalink {
        display: block;
      }
    </style>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-KVNWBNT5FB');
      gtag('config', 'UA-50555-3');
    </script>
  </head>
  <body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="https://perldoc.perl.org/">Perldoc Browser</a>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perlfaq1.html#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.35.0</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-stable">
          <a class="dropdown-item" href="https://perldoc.perl.org/perlfaq1">Latest</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.2/perlfaq1">5.38.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.1/perlfaq1">5.38.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0/perlfaq1">5.38.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.3/perlfaq1">5.36.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.2/perlfaq1">5.36.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.1/perlfaq1">5.36.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.0/perlfaq1">5.36.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.3/perlfaq1">5.34.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.2/perlfaq1">5.34.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.1/perlfaq1">5.34.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.0/perlfaq1">5.34.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.1/perlfaq1">5.32.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.0/perlfaq1">5.32.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.3/perlfaq1">5.30.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.2/perlfaq1">5.30.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.1/perlfaq1">5.30.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.0/perlfaq1">5.30.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.3/perlfaq1">5.28.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.2/perlfaq1">5.28.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.1/perlfaq1">5.28.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.0/perlfaq1">5.28.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.3/perlfaq1">5.26.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.2/perlfaq1">5.26.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.1/perlfaq1">5.26.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.0/perlfaq1">5.26.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.4/perlfaq1">5.24.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.3/perlfaq1">5.24.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.2/perlfaq1">5.24.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.1/perlfaq1">5.24.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.0/perlfaq1">5.24.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.4/perlfaq1">5.22.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.3/perlfaq1">5.22.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.2/perlfaq1">5.22.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.1/perlfaq1">5.22.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.0/perlfaq1">5.22.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.3/perlfaq1">5.20.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.2/perlfaq1">5.20.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.1/perlfaq1">5.20.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.0/perlfaq1">5.20.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.4/perlfaq1">5.18.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.3/perlfaq1">5.18.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.2/perlfaq1">5.18.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.1/perlfaq1">5.18.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.0/perlfaq1">5.18.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.3/perlfaq1">5.16.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.2/perlfaq1">5.16.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.1/perlfaq1">5.16.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.0/perlfaq1">5.16.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.4/perlfaq1">5.14.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.3/perlfaq1">5.14.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.2/perlfaq1">5.14.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.1/perlfaq1">5.14.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.0/perlfaq1">5.14.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.5/perlfaq1">5.12.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.4/perlfaq1">5.12.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.3/perlfaq1">5.12.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.2/perlfaq1">5.12.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.1/perlfaq1">5.12.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.0/perlfaq1">5.12.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.1/perlfaq1">5.10.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.0/perlfaq1">5.10.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.9/perlfaq1">5.8.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.8/perlfaq1">5.8.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.7/perlfaq1">5.8.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.6/perlfaq1">5.8.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.5/perlfaq1">5.8.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.4/perlfaq1">5.8.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.3/perlfaq1">5.8.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.2/perlfaq1">5.8.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.1/perlfaq1">5.8.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.0/perlfaq1">5.8.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.2/perlfaq1">5.6.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.1/perlfaq1">5.6.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.0/perlfaq1">5.6.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_04/perlfaq1">5.005_04</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_03/perlfaq1">5.005_03</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_02/perlfaq1">5.005_02</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_01/perlfaq1">5.005_01</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005/perlfaq1">5.005</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perlfaq1.html#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-dev">
          <a class="dropdown-item" href="https://perldoc.perl.org/blead/perlfaq1">blead</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.6/perlfaq1">5.39.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.5/perlfaq1">5.39.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.4/perlfaq1">5.39.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.3/perlfaq1">5.39.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.2/perlfaq1">5.39.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.1/perlfaq1">5.39.1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC2/perlfaq1">5.38.0-RC2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC1/perlfaq1">5.38.0-RC1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.11/perlfaq1">5.37.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.10/perlfaq1">5.37.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.9/perlfaq1">5.37.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.8/perlfaq1">5.37.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.7/perlfaq1">5.37.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.6/perlfaq1">5.37.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.5/perlfaq1">5.37.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.4/perlfaq1">5.37.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.3/perlfaq1">5.37.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.2/perlfaq1">5.37.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.1/perlfaq1">5.37.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.0/perlfaq1">5.37.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.11/perlfaq1">5.35.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.10/perlfaq1">5.35.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.9/perlfaq1">5.35.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.8/perlfaq1">5.35.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.7/perlfaq1">5.35.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.6/perlfaq1">5.35.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.5/perlfaq1">5.35.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.4/perlfaq1">5.35.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.3/perlfaq1">5.35.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.2/perlfaq1">5.35.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.1/perlfaq1">5.35.1</a>
          <a class="dropdown-item active" href="perlfaq1.html">5.35.0</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perlfaq1.html#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-nav">
          <a class="dropdown-item" href="perl.html">Perl</a>
          <a class="dropdown-item" href="perlintro.html">Intro</a>
          <a class="dropdown-item" href="perl.html#Tutorials">Tutorials</a>
          <a class="dropdown-item" href="perlfaq.html">FAQs</a>
          <a class="dropdown-item" href="perl.html#Reference-Manual">Reference</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlop.html">Operators</a>
          <a class="dropdown-item" href="functions.html">Functions</a>
          <a class="dropdown-item" href="variables.html">Variables</a>
          <a class="dropdown-item" href="modules.html">Modules</a>
          <a class="dropdown-item" href="perlutil.html">Utilities</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlcommunity.html">Community</a>
          <a class="dropdown-item" href="perlhist.html">History</a>
        </div>
      </li>
    </ul>
    <ul class="navbar-nav">
      <script>
        function set_expand (expand) {
          var perldocdiv = document.getElementById('perldocdiv');
          var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width');
          var expanded = (width == '' || width == 'none') ? true : false;
          if (expand === null) {
            expand = !expanded;
          }
          if ((expand && !expanded) || (!expand && expanded)) {
            perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px');
            var button_classlist = document.getElementById('content-expand-button').classList;
            if (expand) {
              button_classlist.add('btn-light');
              button_classlist.remove('btn-outline-light');
            } else {
              button_classlist.add('btn-outline-light');
              button_classlist.remove('btn-light');
            }
          }
          return expand;
        }
        function toggle_expand () {
          var expand = set_expand(null);
          document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC';
        }
        function read_expand () {
          return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 });
        }
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', function () {
            if (read_expand()) {
              set_expand(true);
            }
          });
        } else if (read_expand()) {
          set_expand(true);
        }
      </script>
      <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-2" onclick="toggle_expand()">Expand</button>
    <ul>
    <form class="form-inline" method="get" action="https://perldoc.perl.org/5.35.0/search">
      <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search">
    </form>
  </div>
</nav>

    <div id="wrapperlicious" class="container-fluid">
      <div id="perldocdiv">
        <div id="links">
          <a href="perlfaq1.html">perlfaq1</a>
          <div id="more">
            (<a href="perlfaq1.txt">source</a>,
            <a href="https://metacpan.org/pod/perlfaq1">CPAN</a>)
          </div>
        </div>
        <div class="leading-notice">
          You are viewing the version of this documentation from Perl 5.35.0.
            This is a development version of Perl.
        </div>
        <h1><a id="toc">CONTENTS</a></h1>
                  <ul>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#NAME">NAME</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#VERSION">VERSION</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#DESCRIPTION">DESCRIPTION</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#What-is-Perl?">What is Perl?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#Who-supports-Perl?-Who-develops-it?-Why-is-it-free?">Who supports Perl? Who develops it? Why is it free?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#Which-version-of-Perl-should-I-use?">Which version of Perl should I use?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#What-are-Perl-4,-Perl-5,-or-Raku-(Perl-6)?">What are Perl 4, Perl 5, or Raku (Perl 6)?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#What-is-Raku-(Perl-6)?">What is Raku (Perl 6)?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#How-stable-is-Perl?">How stable is Perl?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#How-often-are-new-versions-of-Perl-released?">How often are new versions of Perl released?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#Is-Perl-difficult-to-learn?">Is Perl difficult to learn?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#How-does-Perl-compare-with-other-languages-like-Java,-Python,-REXX,-Scheme,-or-Tcl?">How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#Can-I-do-%5Btask%5D-in-Perl?">Can I do [task] in Perl?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#When-shouldn&#39;t-I-program-in-Perl?">When shouldn&#39;t I program in Perl?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#What&#39;s-the-difference-between-%22perl%22-and-%22Perl%22?">What&#39;s the difference between &quot;perl&quot; and &quot;Perl&quot;?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#What-is-a-JAPH?">What is a JAPH?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#How-can-I-convince-others-to-use-Perl?">How can I convince others to use Perl?</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq1.html#AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</a>
              </li>
          </ul>

      <h1 id="NAME"><a class="permalink" href="perlfaq1.html#NAME">#</a>NAME</h1>

<p>perlfaq1 - General Questions About Perl</p>

<h1 id="VERSION"><a class="permalink" href="perlfaq1.html#VERSION">#</a>VERSION</h1>

<p>version 5.20210411</p>

<h1 id="DESCRIPTION"><a class="permalink" href="perlfaq1.html#DESCRIPTION">#</a>DESCRIPTION</h1>

<p>This section of the FAQ answers very general, high-level questions about Perl.</p>

<h2 id="What-is-Perl?"><a class="permalink" href="perlfaq1.html#What-is-Perl?">#</a><a id="What"></a><a id="What-is-Perl"></a>What is Perl?</h2>

<p>Perl is a high-level programming language with an eclectic heritage written by Larry Wall and a cast of thousands.</p>

<p>Perl&#39;s process, file, and text manipulation facilities make it particularly well-suited for tasks involving quick prototyping, system utilities, software tools, system management tasks, database access, graphical programming, networking, and web programming.</p>

<p>Perl derives from the ubiquitous C programming language and to a lesser extent from sed, awk, the Unix shell, and many other tools and languages.</p>

<p>These strengths make it especially popular with web developers and system administrators. Mathematicians, geneticists, journalists, managers and many other people also use Perl.</p>

<h2 id="Who-supports-Perl?-Who-develops-it?-Why-is-it-free?"><a class="permalink" href="perlfaq1.html#Who-supports-Perl?-Who-develops-it?-Why-is-it-free?">#</a><a id="Who"></a><a id="Who-supports-Perl-Who-develops-it-Why-is-it-free"></a>Who supports Perl? Who develops it? Why is it free?</h2>

<p>The original culture of the pre-populist Internet and the deeply-held beliefs of Perl&#39;s author, Larry Wall, gave rise to the free and open distribution policy of Perl. Perl is supported by its users. The core, the standard Perl library, the optional modules, and the documentation you&#39;re reading now were all written by volunteers.</p>

<p>The core development team (known as the Perl Porters) are a group of highly altruistic individuals committed to producing better software for free than you could hope to purchase for money. You may snoop on pending developments via the <a href="http://www.nntp.perl.org/group/perl.perl5.porters/">archives</a> or you can subscribe to the mailing list by sending perl5-porters-subscribe@perl.org a subscription request (an empty message with no subject is fine).</p>

<p>While the GNU project includes Perl in its distributions, there&#39;s no such thing as &quot;GNU Perl&quot;. Perl is not produced nor maintained by the Free Software Foundation. Perl&#39;s licensing terms are also more open than GNU software&#39;s tend to be.</p>

<p>You can get commercial support of Perl if you wish, although for most users the informal support will more than suffice. See the answer to &quot;Where can I buy a commercial version of Perl?&quot; for more information.</p>

<h2 id="Which-version-of-Perl-should-I-use?"><a class="permalink" href="perlfaq1.html#Which-version-of-Perl-should-I-use?">#</a><a id="Which"></a><a id="Which-version-of-Perl-should-I-use"></a>Which version of Perl should I use?</h2>

<p>(contributed by brian d foy with updates from others)</p>

<p>There is often a matter of opinion and taste, and there isn&#39;t any one answer that fits everyone. In general, you want to use either the current stable release, or the stable release immediately prior to that one.</p>

<p>Beyond that, you have to consider several things and decide which is best for you.</p>

<ul>

<li><p>If things aren&#39;t broken, upgrading perl may break them (or at least issue new warnings).</p>

</li>
<li><p>The latest versions of perl have more bug fixes.</p>

</li>
<li><p>The latest versions of perl may contain performance improvements and features not present in older versions. There have been many changes in perl since perl5 was first introduced.</p>

</li>
<li><p>The Perl community is geared toward supporting the most recent releases, so you&#39;ll have an easier time finding help for those.</p>

</li>
<li><p>Older versions of perl may have security vulnerabilities, some of which are serious (see <a href="perlsec.html">perlsec</a> and search <a href="https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=Perl">CVEs</a> for more information).</p>

</li>
<li><p>The latest versions are probably the least deployed and widely tested, so you may want to wait a few months after their release and see what problems others have if you are risk averse.</p>

</li>
<li><p>The immediate, in addition to the current stable release, the previous stable release is maintained. See <a href="perlpolicy.html#MAINTENANCE-AND-SUPPORT">&quot;MAINTENANCE AND SUPPORT&quot; in perlpolicy</a> for more information.</p>

</li>
<li><p>There are really two tracks of perl development: a maintenance version and an experimental version. The maintenance versions are stable, and have an even number as the minor release (i.e. perl5.24.x, where 24 is the minor release). The experimental versions may include features that don&#39;t make it into the stable versions, and have an odd number as the minor release (i.e. perl5.25.x, where 25 is the minor release).</p>

</li>
<li><p>You can consult <a href="http://dev.perl.org/perl5">releases</a> to determine the current stable release of Perl.</p>

</li>
</ul>

<h2 id="What-are-Perl-4,-Perl-5,-or-Raku-(Perl-6)?"><a class="permalink" href="perlfaq1.html#What-are-Perl-4,-Perl-5,-or-Raku-(Perl-6)?">#</a><a id="What1"></a><a id="What-are-Perl-4-Perl-5-or-Raku-Perl-6"></a>What are Perl 4, Perl 5, or Raku (Perl 6)?</h2>

<p>In short, Perl 4 is the parent to both Perl 5 and Raku (formerly known as Perl 6). Perl 5 is the older sibling, and though they are different languages, someone who knows one will spot many similarities in the other.</p>

<p>The number after Perl (i.e. the 5 after Perl 5) is the major release of the perl interpreter as well as the version of the language. Each major version has significant differences that earlier versions cannot support.</p>

<p>The current major release of Perl is Perl 5, first released in 1994. It can run scripts from the previous major release, Perl 4 (March 1991), but has significant differences.</p>

<p>Raku is a reinvention of Perl, a language in the same lineage but not compatible. The two are complementary, not mutually exclusive. Raku is not meant to replace Perl, and vice versa. See <a href="perlfaq1.html#What-is-Raku-%28Perl-6%29%3F">&quot;What is Raku (Perl 6)?&quot;</a> below to find out more.</p>

<p>See <a href="perlhist.html">perlhist</a> for a history of Perl revisions.</p>

<h2 id="What-is-Raku-(Perl-6)?"><a class="permalink" href="perlfaq1.html#What-is-Raku-(Perl-6)?">#</a><a id="What2"></a><a id="What-is-Raku-Perl-6"></a>What is Raku (Perl 6)?</h2>

<p>Raku (formerly known as Perl 6) was <i>originally</i> described as the community&#39;s rewrite of Perl, however as the language evolved, it became clear that it is a separate language, but in the same language family as Perl.</p>

<p>Raku is not intended primarily as a replacement for Perl, but as its own thing - and libraries exist to allow you to call Perl code from Raku programs and vice versa.</p>

<p>Contrary to popular belief, Raku and Perl peacefully coexist with one another. Raku has proven to be a fascinating source of ideas for those using Perl (the <a href="Moose.html">Moose</a> object system is a well-known example). There is overlap in the communities, and this overlap fosters the tradition of sharing and borrowing that have been instrumental to Perl&#39;s success.</p>

<p>For more about Raku see <a href="https://www.raku.org/">https://www.raku.org/</a>.</p>

<p>&quot;We&#39;re really serious about reinventing everything that needs reinventing.&quot; --Larry Wall</p>

<h2 id="How-stable-is-Perl?"><a class="permalink" href="perlfaq1.html#How-stable-is-Perl?">#</a><a id="How"></a><a id="How-stable-is-Perl"></a>How stable is Perl?</h2>

<p>Production releases, which incorporate bug fixes and new functionality, are widely tested before release. Since the 5.000 release, we have averaged about one production release per year.</p>

<p>The Perl development team occasionally make changes to the internal core of the language, but all possible efforts are made toward backward compatibility.</p>

<h2 id="How-often-are-new-versions-of-Perl-released?"><a class="permalink" href="perlfaq1.html#How-often-are-new-versions-of-Perl-released?">#</a><a id="How1"></a><a id="How-often-are-new-versions-of-Perl-released"></a>How often are new versions of Perl released?</h2>

<p>Recently, the plan has been to release a new version of Perl roughly every April, but getting the release right is more important than sticking rigidly to a calendar date, so the release date is somewhat flexible. The historical release dates can be viewed at <a href="http://www.cpan.org/src/README.html">http://www.cpan.org/src/README.html</a>.</p>

<p>Even numbered minor versions (5.14, 5.16, 5.18) are production versions, and odd numbered minor versions (5.15, 5.17, 5.19) are development versions. Unless you want to try out an experimental feature, you probably never want to install a development version of Perl.</p>

<p>The Perl development team are called Perl 5 Porters, and their organization is described at <a href="http://perldoc.perl.org/perlpolicy.html">http://perldoc.perl.org/perlpolicy.html</a>. The organizational rules really just boil down to one: Larry is always right, even when he was wrong.</p>

<h2 id="Is-Perl-difficult-to-learn?"><a class="permalink" href="perlfaq1.html#Is-Perl-difficult-to-learn?">#</a><a id="Is"></a><a id="Is-Perl-difficult-to-learn"></a>Is Perl difficult to learn?</h2>

<p>No, Perl is easy to start <a href="http://learn.perl.org/">learning</a> --and easy to keep learning. It looks like most programming languages you&#39;re likely to have experience with, so if you&#39;ve ever written a C program, an awk script, a shell script, or even a BASIC program, you&#39;re already partway there.</p>

<p>Most tasks only require a small subset of the Perl language. One of the guiding mottos for Perl development is &quot;there&#39;s more than one way to do it&quot; (TMTOWTDI, sometimes pronounced &quot;tim toady&quot;). Perl&#39;s learning curve is therefore shallow (easy to learn) and long (there&#39;s a whole lot you can do if you really want).</p>

<p>Finally, because Perl is frequently (but not always, and certainly not by definition) an interpreted language, you can write your programs and test them without an intermediate compilation step, allowing you to experiment and test/debug quickly and easily. This ease of experimentation flattens the learning curve even more.</p>

<p>Things that make Perl easier to learn: Unix experience, almost any kind of programming experience, an understanding of regular expressions, and the ability to understand other people&#39;s code. If there&#39;s something you need to do, then it&#39;s probably already been done, and a working example is usually available for free. Don&#39;t forget Perl modules, either. They&#39;re discussed in Part 3 of this FAQ, along with <a href="http://www.cpan.org/">CPAN</a>, which is discussed in Part 2.</p>

<h2 id="How-does-Perl-compare-with-other-languages-like-Java,-Python,-REXX,-Scheme,-or-Tcl?"><a class="permalink" href="perlfaq1.html#How-does-Perl-compare-with-other-languages-like-Java,-Python,-REXX,-Scheme,-or-Tcl?">#</a><a id="How2"></a><a id="How-does-Perl-compare-with-other-languages-like-Java-Python-REXX-Scheme-or-Tcl"></a>How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?</h2>

<p>Perl can be used for almost any coding problem, even ones which require integrating specialist C code for extra speed. As with any tool it can be used well or badly. Perl has many strengths, and a few weaknesses, precisely which areas are good and bad is often a personal choice.</p>

<p>When choosing a language you should also be influenced by the <a href="http://www.cpan.org/">resources</a>, <a href="http://www.cpantesters.org/">testing culture</a> and <a href="http://www.perl.org/community.html">community</a> which surrounds it.</p>

<p>For comparisons to a specific language it is often best to create a small project in both languages and compare the results, make sure to use all the <a href="http://www.cpan.org/">resources</a> of each language, as a language is far more than just it&#39;s syntax.</p>

<h2 id="Can-I-do-[task]-in-Perl?"><a class="permalink" href="perlfaq1.html#Can-I-do-%5Btask%5D-in-Perl?">#</a><a id="Can"></a><a id="Can-I-do-task-in-Perl"></a>Can I do [task] in Perl?</h2>

<p>Perl is flexible and extensible enough for you to use on virtually any task, from one-line file-processing tasks to large, elaborate systems.</p>

<p>For many people, Perl serves as a great replacement for shell scripting. For others, it serves as a convenient, high-level replacement for most of what they&#39;d program in low-level languages like C or C++. It&#39;s ultimately up to you (and possibly your management) which tasks you&#39;ll use Perl for and which you won&#39;t.</p>

<p>If you have a library that provides an API, you can make any component of it available as just another Perl function or variable using a Perl extension written in C or C++ and dynamically linked into your main perl interpreter. You can also go the other direction, and write your main program in C or C++, and then link in some Perl code on the fly, to create a powerful application. See <a href="perlembed.html">perlembed</a>.</p>

<p>That said, there will always be small, focused, special-purpose languages dedicated to a specific problem domain that are simply more convenient for certain kinds of problems. Perl tries to be all things to all people, but nothing special to anyone. Examples of specialized languages that come to mind include prolog and matlab.</p>

<h2 id="When-shouldn&#39;t-I-program-in-Perl?"><a class="permalink" href="perlfaq1.html#When-shouldn&#39;t-I-program-in-Perl?">#</a><a id="When"></a><a id="When-shouldnt-I-program-in-Perl"></a>When shouldn&#39;t I program in Perl?</h2>

<p>One good reason is when you already have an existing application written in another language that&#39;s all done (and done well), or you have an application language specifically designed for a certain task (e.g. prolog, make).</p>

<p>If you find that you need to speed up a specific part of a Perl application (not something you often need) you may want to use C, but you can access this from your Perl code with <a href="perlxs.html">perlxs</a>.</p>

<h2 id="What&#39;s-the-difference-between-&quot;perl&quot;-and-&quot;Perl&quot;?"><a class="permalink" href="perlfaq1.html#What&#39;s-the-difference-between-%22perl%22-and-%22Perl%22?">#</a><a id="What3"></a><a id="Whats-the-difference-between-perl-and-Perl"></a>What&#39;s the difference between &quot;perl&quot; and &quot;Perl&quot;?</h2>

<p>&quot;Perl&quot; is the name of the language. Only the &quot;P&quot; is capitalized. The name of the interpreter (the program which runs the Perl script) is &quot;perl&quot; with a lowercase &quot;p&quot;.</p>

<p>You may or may not choose to follow this usage. But never write &quot;PERL&quot;, because perl is not an acronym.</p>

<h2 id="What-is-a-JAPH?"><a class="permalink" href="perlfaq1.html#What-is-a-JAPH?">#</a><a id="What4"></a><a id="What-is-a-JAPH"></a>What is a JAPH?</h2>

<p>(contributed by brian d foy)</p>

<p>JAPH stands for &quot;Just another Perl hacker,&quot;, which Randal Schwartz used to sign email and usenet messages starting in the late 1980s. He previously used the phrase with many subjects (&quot;Just another x hacker,&quot;), so to distinguish his JAPH, he started to write them as Perl programs:</p>

<pre><code>print &quot;Just another Perl hacker,&quot;;</code></pre>

<p>Other people picked up on this and started to write clever or obfuscated programs to produce the same output, spinning things quickly out of control while still providing hours of amusement for their creators and readers.</p>

<p>CPAN has several JAPH programs at <a href="http://www.cpan.org/misc/japh">http://www.cpan.org/misc/japh</a>.</p>

<h2 id="How-can-I-convince-others-to-use-Perl?"><a class="permalink" href="perlfaq1.html#How-can-I-convince-others-to-use-Perl?">#</a><a id="How3"></a><a id="How-can-I-convince-others-to-use-Perl"></a>How can I convince others to use Perl?</h2>

<p>(contributed by brian d foy)</p>

<p>Appeal to their self interest! If Perl is new (and thus scary) to them, find something that Perl can do to solve one of their problems. That might mean that Perl either saves them something (time, headaches, money) or gives them something (flexibility, power, testability).</p>

<p>In general, the benefit of a language is closely related to the skill of the people using that language. If you or your team can be faster, better, and stronger through Perl, you&#39;ll deliver more value. Remember, people often respond better to what they get out of it. If you run into resistance, figure out what those people get out of the other choice and how Perl might satisfy that requirement.</p>

<p>You don&#39;t have to worry about finding or paying for Perl; it&#39;s freely available and several popular operating systems come with Perl. Community support in places such as Perlmonks ( <a href="http://www.perlmonks.com">http://www.perlmonks.com</a> ) and the various Perl mailing lists ( <a href="http://lists.perl.org">http://lists.perl.org</a> ) means that you can usually get quick answers to your problems.</p>

<p>Finally, keep in mind that Perl might not be the right tool for every job. You&#39;re a much better advocate if your claims are reasonable and grounded in reality. Dogmatically advocating anything tends to make people discount your message. Be honest about possible disadvantages to your choice of Perl since any choice has trade-offs.</p>

<p>You might find these links useful:</p>

<ul>

<li><p><a href="http://www.perl.org/about.html">http://www.perl.org/about.html</a></p>

</li>
<li><p><a href="http://perltraining.com.au/whyperl.html">http://perltraining.com.au/whyperl.html</a></p>

</li>
</ul>

<h1 id="AUTHOR-AND-COPYRIGHT"><a class="permalink" href="perlfaq1.html#AUTHOR-AND-COPYRIGHT">#</a><a id="AUTHOR"></a>AUTHOR AND COPYRIGHT</h1>

<p>Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and other authors as noted. All rights reserved.</p>

<p>This documentation is free; you can redistribute it and/or modify it under the same terms as Perl itself.</p>

<p>Irrespective of its distribution, all code examples here are in the public domain. You are permitted and encouraged to use this code and any derivatives thereof in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit to the FAQ would be courteous but is not required.</p>


      </div>
      <div id="footer">
        <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p>

<p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p>


      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="../highlight.pack.js"></script>
    <script>hljs.highlightAll();</script>
  </body>
</html>
